<%@ page contentType="text/html; charset=utf-8" language="java" import="java.sql.*" errorPage="" %>
<%@page import="offer.SessionObj"%>
<%@page import="offer.system.ModuleStatus"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";

SessionObj sessionObj = null;
if( null != request.getSession().getAttribute("sessionObj") ){
	sessionObj = (SessionObj)request.getSession().getAttribute("sessionObj");
}
String module_status_text = ModuleStatus.getStatusText(sessionObj.getModuleStatus());
String op_from = null;
String indexUrl = "GoToIndexServlet";
if(null != request.getAttribute("op_from")){
	op_from = (String)request.getAttribute("op_from");
	if(op_from.equalsIgnoreCase("op_Audit")){
		indexUrl = "GetUnauditDocForMemberServelt";
	}
}
%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
  <head> 
    <title>NETCONF Development Toolkit</title>
    
    <meta http-equiv="Pragma" content="no-cache" />
    <meta http-equiv="Cache-Control" content="no-cache" />
    <meta http-equiv="Expires" content="0" />
	<link rel="stylesheet" type="text/css" href="css/index.css"  />
	<link rel="stylesheet" type="text/css" href="css/items.css"  />
    <script type="text/javascript"  src="jstree-v.pre1.0/_lib/jquery.js"></script>
    <script type="text/javascript"  src="jstree-v.pre1.0/jquery.jstree.js"></script>
    <script type="text/javascript"  src="js/index.js"></script>
    <script type="text/javascript"  src="js/menu.js"></script>
    <script type="text/javascript"  src="js/Audit.js"></script>
    <script type="text/javascript"  src="js/getElementPos.js"></script>
    <script type="text/javascript"  src="<%=basePath%>js/StringUtil.js"></script>
    <script type="text/javascript">
	var copy_nodeId = "-1";
    $(function () {  
    	$("#treeContent").jstree({ 
    		"plugins" : [ "themes", "json_data" ,"ui","crrm","dnd","contextmenu","search" ],
			 "themes":{
                   "theme" : "apple",
                   "dots"  : false,
                   "icons" : true
             },   
			"json_data" : { 
				 "ajax" : {  
					"url"  : "LoadTreeServlet" ,
					"dataType": "json",
                    "contentType": "application/json charset=utf-8",
                    "data": function(n) { return { nodeId: n.attr ? n.attr("id") : "Module" }; },
                    "success": function() {
                    }
           		  } 
			},
			"contextmenu": {
				 "items": {
				 <% if((null != sessionObj) && ( null == op_from) && (sessionObj.getModuleStatus().toString().equalsIgnoreCase("EDITING")) )  { %>
					 "create": {
						 	"label": "Add ",
						 	"separator_after"   : false,
						 	"icon" : "<%=basePath %>images/create.jpg",
							"action": function (obj) { 
							// Ajax get Data from web
							/*-------------function begin---------------------------*/
							$.ajax({
							    	type: "get",
							    	dataType:"xml",
       								"url" : "GetAddItemServlet?nodeLevel="+obj.attr("id")+"&itemClassName=" + obj.attr("className"),
       								beforeSend: function(XMLHttpRequest){
                                        //ShowLoading();
                                    },
       								success: function(data, textStatus){
                                   /******************************************************************************************/
                 						//保存ajax获得的xml数据
                 						ajaxMml = data;
        								$(".floatLeft").html("");
        								$(".floatLeft").append("Choose sub for <strong>This Node</strong>");
										$("#Item_ul").html("");
										$(data).find("subItem").each(function(index, element) {
                                            var NodeName         = $(this).children("FieldName").text();
                                            var DisplayName      = $(this).children("DisplayName").text();
											var ElementClass     = $(this).children("ElementClass").text();
											var ImageName        = $(this).children("ImageName").text();
											var attr_leaf        = $(this).attr("is_leaf");
											$("#Item_ul").append("<li onMouseOut= \"this.className='' \"  id = '" + obj.attr("id") + "'"
											+ "onMouseOver=\"this.className='hightlight'\" onclick='chooseItem(this.id ,\""+ ElementClass +"\",\""+NodeName+"\")' >" 
											+ "<img class='icoImg'  src='<%=basePath%>images/" +ImageName+".jpg' /> "
											+ DisplayName + "</li>");
                                         });
                                    /******************************************************************************************/
       								},
       								complete: function(XMLHttpRequest, textStatus){
										$("#ItemContenter").css("display", "block");
										showMenu(obj.attr("id"))
										//HideLoading();
									},
									error: function(){
										//请求出错处理
									}
                                   })
							/*-------------function end  ---------------------------*/
							}
					  },
					 "copy": {
					 	"label": "Copy",
				 		"icon" : "<%=basePath %>images/copy.jpg",
				 		"action": function (obj) {
				 			if(obj.attr("className").indexOf("Module") > 0 
					            || obj.attr("className").indexOf("Import") > 0
					            || obj.attr("className").indexOf("Include") > 0
					            || obj.attr("className").indexOf("Revision") > 0
					            || obj.attr("className").indexOf("Extension") > 0
					            || obj.attr("className").indexOf("Feature") > 0
					            || obj.attr("className").indexOf("Deviation") > 0
				 			 ){
				 				alert("当前节点不能复制");
				            	return;
				 			 }
				 			 var idArr = obj.attr("id").split("\\");
				 			 if(idArr.length == 2){
				 			 	if(idArr[1] == "configuration"
				 			 	   || idArr[1] == "state"
				 			 	   || idArr[1] == "operation"){
				 			 	   		alert("当前节点不能复制");
				            			return;
				 			 	}
				 			 }
				 			 copy_nodeId = obj.attr("id");
				 		}
					 },
					 "paste": {
					 	"label": "Paste",
				 		"icon" : "<%=basePath %>images/paste.jpg",
				 		"action": function (obj) {
				 			if(copy_nodeId == "-1"){
				 				alert("请先复制一个节点");
				 				return;
				 			}
				 			if(copy_nodeId == obj.attr("id")){
				 				return;
				 			}
				 			if(obj.attr("className").indexOf("Leaf") > 0 ){
				 				alert("当前节点不能包含子节点");
				 			}
				 			//alert(copy_nodeId);
				 			var tree      = jQuery.jstree._reference('#treeContent');
				 			var parentObj = tree._get_parent(obj);
				 			// Ajax delete Node Data 
							/*-------------function begin---------------------------*/	
							
							$.ajax({
									type: "get",
							    	dataType:"text",
       								"url" : "PasteNodeServlet?destLevel="+obj.attr("id")+"&srcLevel=" + copy_nodeId,
       								beforeSend: function(XMLHttpRequest){
                                    },
                                    success: function(data, textStatus){
                                       if(data == "Success"){
                                       		if(tree.is_closed ( obj )){
                                       			tree.open_node(obj,false);
                                       		}
                                       		tree.refresh ( obj );
                                       }else{
                                       		$("#NoticeContent").html("");
						                	$("#NoticeContent").append(
						                	"<div align='left' style='text-align:left;'>"
						                	+data
						                	+"</div>"
						                	);
						                	showStateNotice();
                                       }
								    },
       								complete: function(XMLHttpRequest, textStatus){
       								},
									error: function(){
										//请求出错处理
									}
							})
							/*-------------function end  ---------------------------*/
				 		}
					 },
					 "rename": {
					 	"label": "Rename",
				 		"icon" : "<%=basePath %>images/rename.jpg"
					 },
					 "remove": {
				 		"label": "Remove",
					 	"separator_after"   : false,     // Insert a separator after the item
				 		"icon" : "<%=basePath %>images/delete.jpg",
				 		"action": function (obj) { 
				 			if(confirm("确定要删除该节点吗?")){ 
				 			}else {
				 			    return false; 
				 			}
				 			var tree      = jQuery.jstree._reference('#treeContent');
				 			var parentObj = tree._get_parent(obj);
				 			// Ajax delete Node Data 
							/*-------------function begin---------------------------*/	
							
							$.ajax({
									type: "get",
							    	dataType:"text",
       								"url" : "DeleteNodeServlet?nodeLevel="+obj.attr("id")+"&itemClassName=" + obj.attr("className"),
       								beforeSend: function(XMLHttpRequest){
                                    },
                                    success: function(data, textStatus){
                                       opensrc("Welcome.jsp");
                                       if(parentObj.attr("id") == "Module"){
                                       		tree.refresh ( -1 );
                                       }else{
                                            tree.refresh ( parentObj );
                                       }
                                       
								    },
       								complete: function(XMLHttpRequest, textStatus){
       								},
									error: function(){
										//请求出错处理
									}
							})
							/*-------------function end  ---------------------------*/
				 		}
					 },
					 <% } else{%>
					 "create"     :null,
					 "rename"     :null,
					 "remove"     :null,
					 <% } %>
					 "validate"   : {
					 	"label": "validate",                        
					 	"separator_after"   : true,     // Insert a separator after the item
				 		"icon" : "<%=basePath %>images/validate.jpg",
				 		"action": function (obj) {
				 			var tree       = jQuery.jstree._reference('#treeContent');
				 			var nodeidStr  = obj.attr("id");
				 			var nodeidStrs = obj.attr("id").split("@");
				 			var nodeName   = "";
				 			var classNames = obj.attr("className").split(".");
				 			var calssName  = classNames[classNames.length - 1];
				 			if(nodeidStrs.length < 2){
				 				nodeidStrs = obj.attr("id").split("\\");
				 			}
				 			calssName = (calssName=="YangList")?"List":calssName
				 			nodeName  = calssName+":"+ nodeidStrs[nodeidStrs.length -1];
       						// Ajax validate Node Data 
							/*-------------function begin---------------------------*/	
							$.ajax({
									type: "post",
							    	dataType:"xml",
       								"url" : "ValidateNodeServlet",
       								data  : {nodeLevel:obj.attr("id")},
       								beforeSend: function(XMLHttpRequest){
                                    },
                                    success: function(data, textStatus){
                                     /******************************************************************************************/
                 						/***************************************
                 						*   清空 验证 记录  Begin
                 						*************************************** */
                 						cleanValidate(tree);
                 						/***************************************
                 						*   清空 验证 记录  End
                 						*************************************** */
                 						//保存ajax获得的xml数据
                 						ajaxValidateXml = data;
                 						var len = $(data).find("length").text();
                 						//alert(len);
                 						var validateObj = new ValidateResult(len);
                 						var Result;
                 						var Severity;
                 						var Reason;
                 						var NodeIdStr;
                 						$(data).find("validateResult").each(function(index, element) {
                                              Result      = $(this).children("Result").text();
                                              Severity    = $(this).children("Severity").text();
                                              Reason      = $(this).children("Reason").text();
                                              //Reason      = Reason.replaceAll("###","<br/>");
								              NodeIdStr   = $(this).children("NodeIdStr").text();
	                                          validateObj.add(Result,Severity,Reason,NodeIdStr);
                                         });
                 						validateObj.updateTree(tree);
                                     /******************************************************************************************/
								     if( len == 0 ){ //验证通过
								     	$("#NoticeContent").html("<span style='color:#3cc43c;'>["+nodeName+"]验证通过!</span><br/>");
                 						showStateNotice();
               							setTimeout(function(){hideStateNotice();},3000);
								     }
								    },
       								complete: function(XMLHttpRequest, textStatus){
       								},
									error: function(){
										//请求出错处理
									}
							})
							/*-------------function end  ---------------------------*/
				 		}
					 },
					 "ccp": null,
					 "Expand" : {
					 	"label": "Expand",                        
				 		"icon" : "<%=basePath %>images/expand.jpg",
				 		"action": function (obj) {
            			    $("#treeContent").jstree("open_all", obj, false, false);
				 		}
					 },
					 "Collapse": {
					 	"label": "Collapse",                        
				 		"icon" : "<%=basePath %>images/collapse.jpg",
				 		"action":function(obj){
				 			$("#treeContent").jstree("close_all", obj, false);
				 		}
					 }
				}
			}  
		}).bind("dblclick_node.jstree", 
		   function (event,data){
		       //alert(data.rslt.obj.attr("id") ); 
		       var src = encodeURI("<%=basePath%>GetItemContentServlet?nodeLevel=" +  data.rslt.obj.attr("id"));
		       document.getElementById("ContentIframe").src = src;
	    }).bind("rename.jstree", function (e, data) {
	    	if (data.rslt.new_name == data.rslt.old_name){
                    return ;
            }
            if(data.rslt.obj.attr("className").indexOf("Module") > 0 
            || data.rslt.obj.attr("className").indexOf("Import") > 0
            || data.rslt.obj.attr("className").indexOf("Include") > 0
            || data.rslt.obj.attr("className").indexOf("Revision") > 0
            || data.rslt.old_name == "configuration"
            || data.rslt.old_name == "state"
            || data.rslt.old_name == "operation"){
            	alert("当前节点不能重命名�");
            	$.jstree.rollback(data.rlbk);
            	return;
            }
            //名字中不能包含下划线
            if(!nameVerify(data.rslt.new_name,data.rslt.obj)){
		 		$.jstree.rollback(data.rlbk);
		 		return ;
		 	}
	    	
	        // Ajax rename Node Data 
			/*-------------function begin---------------------------*/	
     		var tree     = jQuery.jstree._reference('#treeContent');
			var treeData = data;
			var newName  = data.rslt.new_name;
			$.ajax({
					type: "post",
			    	dataType:"text",
					"url" : "RenameNodeServlet?nodeLevel="+data.rslt.obj.attr("id")+"&newName=" + data.rslt.new_name,
					beforeSend: function(XMLHttpRequest){
                    },
                    success: function(data, textStatus){
                         if("Success" != data){
   							var currObj  = document.getElementById(data);
   							var currNode = tree._get_node ( currObj );
   							//展开当前节点
   							currNode.parents(".jstree-closed").each(function () {
            					$("#treeContent").jstree("open_node", this, false, true);
    						});
   							currNode.children("a").css("color","#0F0");
							currNode.children("a").css("font-weight","bold");
							setTimeout(function(){
     							currNode.children("a").css("color","");
 								currNode.children("a").css("font-weight","");
       						},5000);
       						setTimeout(function(){
                         		$.jstree.rollback(treeData.rlbk);
                         	},5001);
                         	$("#NoticeContent").html("检测到重名节点，该节点不能从命名为："+ newName);
     						showStateNotice();
   							setTimeout(function(){hideStateNotice();},3000);
                         }else{
                         	var parentObj = tree._get_parent(treeData.rslt.obj);
				 	    	if(parentObj.attr("id") == "Module"){
                       			tree.refresh ( -1 );
                        	}else{
                            	tree.refresh ( parentObj );
                        	}
                         }
				    },
					complete: function(XMLHttpRequest, textStatus){
				 	    
   					},
					error: function(){
						//请求出错处理
					}
			})
		    /*-------------function end  ---------------------------*/
	    }).bind("move_node.jstree", function (e,data){
	     	if(data.rslt.o.attr("className").indexOf("Module") > 0 
            || data.rslt.o.attr("className").indexOf("Import") > 0
            || data.rslt.o.attr("className").indexOf("Include") > 0
            || data.rslt.o.attr("className").indexOf("Extension") > 0
            || data.rslt.o.attr("className").indexOf("Feature") > 0
            || data.rslt.o.attr("className").indexOf("Typedef") > 0
            || data.rslt.o.attr("className").indexOf("Revision") > 0){
            	alert("当前节点不支持MOVE操作�");
            	$.jstree.rollback(data.rlbk);
            	return;
            }
            var new_paren_className = data.rslt.np.attr("className").split(".");
            if( new_paren_className[new_paren_className.length -1].indexOf("Leaf")>=0){
            	alert("Leaf节点不能再添加子节点�");
            	$.jstree.rollback(data.rlbk);
            	return;
            }
            var curNodeLevels = data.rslt.o.attr("id").split("\\");
            if(curNodeLevels.length == 2 &&
              (curNodeLevels[1] == "configuration" ||
               curNodeLevels[1] == "state" || 
               curNodeLevels[1] == "operation" )  ){
                  alert("当前节点不支持MOVE操作 �");
            	  $.jstree.rollback(data.rlbk);
            	  return;  
            }
	     	/**
            *  new Parent : data.rslt.np.attr("id") 
	     	*  old Parent : data.rslt.op.attr("id")
	     	*  self Node  : data.rslt.o.attr("id")
	     	*/
	     	// Ajax move Node Data 
			/*-------------function begin---------------------------*/	
			var prev_node  = getPrev_node(data.rslt.np,data.rslt.o);
			var treeData = data;
			$.ajax({
					type: "post",
			    	dataType:"text",
					"url" : "MoveNodeServlet",
					//提交的数�?
					data: {nodeLevel: data.rslt.o.attr("id") ,newParent:data.rslt.np.attr("id"), oldParent:data.rslt.op.attr("id"),prev_nodeId:prev_node.attr("id")},
					beforeSend: function(XMLHttpRequest){
                    },
                    success: function(data, textStatus){
                         if("Success" != data){ 
                         	alert("由于 "+data+"原因，结点移动失败，将自动撤销本次操作");
                         	$.jstree.rollback(treeData.rlbk); 
                         }
				    },
					complete: function(XMLHttpRequest, textStatus){
						var tree      = jQuery.jstree._reference('#treeContent');
				 		tree.refresh ( data.rslt.np );
   					},
					error: function(){
						//请求出错处理
						$.jstree.rollback(data.rlbk); 
					}
			})
			/*-------------function end  ---------------------------*/
	    }).bind("select_node.jstree", 
		   function (event,data){
		       if(data.rslt.obj.children("a").css("font-weight")=="700"){
		       		var xmlData = ajaxValidateXml;
		       		var NodeIdStr;
		       		var Reason;
		       		$(xmlData).find("validateResult").each(function(index, element) {
                        Reason      = $(this).children("Reason").text();
		                NodeIdStr   = $(this).children("NodeIdStr").text();
		                if(NodeIdStr == data.rslt.obj.attr("id")){
		                    Reason  = Reason.replaceAll("###","<br/>"); 
		                	$("#NoticeContent").html("");
		                	$("#NoticeContent").append(
		                	"<div align='left' style='text-align:left;'>"
		                	+Reason
		                	+"</div>"
		                	);
		                	showStateNotice();
		                	return false;
		                }
                    });
		       }
	    })
	    
  }); 
 
  // Code for the menu buttons
  var ajaxValidateXml ;
 //用于保存通过Ajax获得的xml数据
 var ajaxMml ;
 function getValuesList(ValuesList){
     var valusList =ValuesList.split(","); 
     var optStr ="<option></option>";
	 for( i = 0; i < valusList.length ; i++){
		optStr += "<option>"+valusList[i]+"</option>";
	 }
	 return optStr;
 }
 function reloadTree(){
 	$('#treeContent').jstree('refresh', -1); 
 }
 
 function reloadTreeWithNode(nodeId){
 	displayNode(nodeId);
 }
 function displayNode(nodeIdStr){
 	 
     var tree     = jQuery.jstree._reference('#treeContent');
     var len = nodeIdStr.lastIndexOf("\\");
     //当nodeId 为 Element@***@**时，及父节点为root节点时
     
     if(len < 0){
     	tree.refresh ( -1 );
     	return;
     }else{
	     var parentObj  = document.getElementById(nodeIdStr.substring(0,len));
	     var parentNode = tree._get_node ( parentObj );
	     tree.refresh ( parentNode );
     }
     setTimeout(function(){
     	$("#treeContent").jstree("open_node", parentObj, false, true);
     	var currObj  = document.getElementById(nodeIdStr);
     	var currNode = tree._get_node ( currObj );
     	currNode.children("a").css("color","#0F0");
  		currNode.children("a").css("font-weight","bold");
  		setTimeout(function(){
	      	currNode.children("a").css("color","");
	  		currNode.children("a").css("font-weight","");
        },2000);
     },3000);
     
 }
 function submitForm(){
    if(checkForm()){
	 	document.getElementById("CreateNodeForm").submit();
	 	hideCreateInfo();
 	}
 }
 function checkForm(){
 	var  data = ajaxMml;
    var i = 0;
    $(":input").css("border-color","");
    var nameList = $(".fieldSpan");
    var checkFlag = true;
    var NodeName = document.getElementById("currNodeName").value;
    $(data).find(NodeName+"_FieldItem").each(function(index, element) {
    	var FieldName     = $(this).children("FieldName").text();
    	var obj           = $("#"+FieldName);
    	if(!checkFormValue(obj,$(nameList[i]).html())){
    		checkFlag = false;
    	    return false;
    	}
    	i++;
    });
    
    return checkFlag;
 }
 
 function checkFormValue(formobj,notice){
	if( "" == $(formobj).val()){
		alert(notice+"不能为空!");
		$(formobj).css("border-color","red");
		return false;
	/*}else if( $(formobj).val().indexOf("_") >0 ){
    	alert(notice+"不能包含 \"_\"");
    	$(formobj).css("border-color","red");
		return false;*/
    }else if( $(formobj).val().indexOf(" ") >0 ){
    	alert(notice+"不能包含 \" \"");
    	$(formobj).css("border-color","red");
		return false;
    }
    return true;
 }
 
 $(document).ready(function () {
	$("#B_Search").click(function () {
	     var key_text = $("#search_key").val();
		$("#treeContent").jstree("search", key_text);
	});
	$("#search_key").keypress(function(e){
   		var curKey = e.which;
   		if(curKey == 13)
   		{
       		var key_text = $("#search_key").val();
       		$("#treeContent").jstree("search", key_text);
   		}
   });
	$("#B_Clean").click(function () {
		$("#search_key").val("");
		$("#treeContent").jstree("clear_search");
		//清空alidate
		var tree     = jQuery.jstree._reference('#treeContent');
		cleanValidate(tree);
	});
	 <% if((null != sessionObj) && (sessionObj.getModuleStatus().toString().equalsIgnoreCase("EDITING")) )  { %>
	 autoSave();
	 <%}%>
	 showModuleStatus();
});
 
 function opensrc(src){
     document.getElementById("ContentIframe").src=encodeURI(src);//兼容 ie Firefox
 }
 
 function autoSave(){
 	setTimeout(function(){
 		submitSaveModule("autoSave");
 		autoSave();
 	},1000*60*10);
 }
 function showModuleStatus(){
    var statusNoe  = document.getElementById("module_status_div");
 	var pos        = getElementPos("treeContent");
 	var getPosLeft = pos.x - statusNoe.offsetWidth +5 ;           //计算弹出层的top        
	var getPosTop  = pos.y + 5;                          //css定位弹出
	$("#module_status_div").css({ "left": getPosLeft, "top": getPosTop });  
 }
    </script>
  </head>
<body class="body">
 <!-- <div id="titleContent" class="titleContent">
  <div class="title_bar">
    <div style="float:left;width:300px"><img width="300" height="50" src="images/log_3.png" /></div>
    <div style="float:left;width:800px" >
       <div align="left" style="font-size:14px;height:32px;margin:0px;padding-top:2px;border:0px;">
        
       </div>
       <div align="right" style="font-size:14px;margin:0px;padding:0px;border:0px;">
           <a href="<%=indexUrl %>">返回列表页</a>&nbsp;&nbsp;&nbsp;
           <% if((null != sessionObj) && (sessionObj.getModuleStatus().toString().equalsIgnoreCase("EDITING")) ) {%>
           <a href="#" onclick="javascript:saveModuleToDb()">保存</a> &nbsp;&nbsp;&nbsp;
           <a href="#" onclick="javascript:submitModuleToAudit()">提交审核</a> &nbsp;&nbsp;&nbsp; 
           <%} %>
           <% if(null != op_from && op_from.equalsIgnoreCase("op_Audit")){ %>
           <a href="GoToAuditServlet" target= "ContentIframe" >填写审核结果</a> &nbsp;&nbsp;&nbsp; 
           <% } %>
            <a href="GoToAuditServlet" target= "ContentIframe" >查看审核结果</a> &nbsp;&nbsp;&nbsp; 
           <a href="login.jsp?op=loginOut">注销</a>&nbsp;&nbsp;&nbsp;
           <a target="_balck" href="downloadfiles.jsp">文档下载</a>&nbsp;&nbsp;&nbsp;
          
       </div>
    </div>
    <div style="clear:both;"></div>
   </div>
 </div>  -->
 <jsp:include page="mainWork_navigator.jsp"></jsp:include>
 <div id="MainContent" class="mainContent" >
   <div id="leftContent" >
   <div id="searchBar" style=" background:#425DA5;padding:1px;">
	   <input type="text" id="search_key" name="search_key"  />
	   <input type="button" value="Search" id="B_Search" />
	   <input type="button" value="Clean" id="B_Clean" />
   </div>
   <div id="treeContent"  style="WIDTH: 300px; HEIGHT: 574px; OVERFLOW: auto; scrollbar-face-color: #DBEBFE; scrollbar-shadow-color: #B8D6FA; scrollbar-highlight-color: #FFFFFF; scrollbar-3dlight-color: #DBEBFE; scrollbar-darkshadow-color:#458CE4; scrollbar-track-color: #FFFFFF; scrollbar-arrow-color: #458CE4;">
   </div>
   </div>
   <div id="rightContent">
   <!-- ===================================================== -->
     <iframe width="100%"  id="ContentIframe" name="ContentIframe"  height=100% border="0" frameborder="0" src="<%=basePath%>Welcome.jsp"  ></iframe>
   <!-- ===================================================== -->
   </div>
   <div style="clear:both" ></div>
 </div>
 <div id="coverDiv" class="coverDiv"></div> <!-- 覆盖层，要放在所有弹出层之前 -->
 <div id="ItemContenter" class="item_contenter">
 	<div id="ItemContenter_title">
        <div class="floatLeft">Choose The Object</div>
        <div class="floatRight">
            <a href="javascript:void(0);" id="menu_close" title="close">close</a>
        </div>
        <div style="clear:both" ></div>
    </div>
 	<ul id="Item_ul">
 	</ul>
 </div>
 <!-- ******************************************* -->
 <div id="ItemAddContenter" class="addContenter" >
    <div id="addItem_title">
        <div id="createInfo_title" style="float:left; font-weight:bold;">Add a new Object</div>
        <div style="float:right;">
            <a href="javascript:void(0);" id="createInfo_close" title="close">close</a>
        </div>
        <div style="clear:both" ></div>
    </div>
    <form id="CreateNodeForm" action="CreateNodeServlet" method ="post" target ="ContentIframe" onsubmit="return false" >
    	<div id="Itme_add" >
    	</div>
    	<div class="submitContainer">
    	    <input type="hidden" id="nodeLevel" name = "nodeLevel" />
    	    <input type="hidden" id="itemClassName" name = "itemClassName" />
    	    <input type="hidden" id="currNodeName" name = "currNodeName" />
	    	<input type="button" id="CreateButton" value="Create" onclick="submitForm()" />&nbsp;
	    	<input type="button" value="Cancel" onclick="hideCreateInfo()"  />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
   		</div>
    </form>
 </div>
 
 <div id="SaveModuleToDBDiv" class="saveNoticeContenter">
    <div id="addItem_title">
        <div id="Validate_title" style="float:left; font-weight:bold;">Validate The Module </div>
        <div style="float:right;">
            <a href="javascript:void(0);" id="Validate_close" title="close">close</a>
        </div>
        <div style="clear:both" ></div>
    </div>
    <form id="SaveModuleForm" action="SaveModuleToDBServlet" method ="post" target ="_top" onsubmit="return false" >
    	<div id="validateNotice" style=" padding:5px;border:1px solid #EAEAEA; margin:5px; color:red;font-weight:bold;"  >
    		<div id="SaveValidateInfo" style="margin:0px;overflow:auto;max-height:120px;border:1px;border-color:#666;color:#000;font-size:14px;"></div>
		</div>
		<div align = "right" style="margin:5px; padding:5px 300px 2px 0px; border:1px solid #EAEAEA; color:red;font-weight:bold;">
			<span style="color:#999;font-size:12px;">
    		&nbsp;&nbsp;&nbsp;&nbsp;你可以通在左边树的节点:<span style="color:#5aa608;font-size:12;">右键->Validate </span>来验证节点的合法性
    		</span><br/>
    		&nbsp;&nbsp;&nbsp;&nbsp;该模型验证未通过，您希望是：
		</div>
    	<div id="validateOption" class="submitContainer">
    	   <input type="button" value="继续保存" onclick="submitSaveModule()" /> &nbsp;
    	   <input type="button" value="放弃保存" onclick="delaySaveModule()"/> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
   		</div>
    </form>
 </div>
 
 <div id="submitModuleToAuditDiv" class="saveNoticeContenter">
    <div id="addItem_title">
        <div id="Audit_title" style="float:left; font-weight:bold;">请选择QA审核人员 </div>
        <div style="float:right;">
            <a href="javascript:void(0);" id="Audit_close" title="close">close</a>
        </div>
        <div style="clear:both" ></div>
    </div>
    <form id="SubmitToAuduitModuleForm" action="" method ="post" target ="_top" onsubmit="return false" >
    	<div  style=" padding:5px;border:1px solid #EAEAEA; margin:5px; color:red;font-weight:bold;"  >
    		<div id="QAmembersListDiv" style="margin:0px;overflow:auto;max-height:120px;border:1px;border-color:#666;color:#000;font-size:14px;">
    		   
    		</div>
		</div>
    	<div id="AuditOption" class="submitContainer">
    	   <input type="button" id="qaSubmitButton" value="确定" onclick="submitAuditModule()" /> &nbsp;
    	   <input type="button" id="qaCaselButton" value="取消" onclick="hiddenSubmitAudit()"/> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
   		</div>
    </form>
 </div>
 <!-- =================================================提交QA审核结果 Begin========================================================= -->
 
 <!-- =================================================提交QA审核结果 END=========================================================== -->
 <div id="OperationStateNotice" style ="background:#5A9208 url(images/notice_bg.png) repeat-x;display:none; position:absolute;width:1000px;border-left:1px solid #EAEAEA;border-top:1px solid #B3B3B3;border-right:1px solid ##EAEAEA;">
 	<div style=" padding:2px 8px 2px 20px; border-bottom:1px solid #666;">
        <div id="Validate_title" style="float:left; font-weight:bold;color:#FFF">Operation State Notice </div>
        <div style="float:right;">
            <a style="color:#FFF;text-decoration:none;" href="javascript:void(0);" id="StateNotice_close" title="close">close<img style="border:0px;" height="14" src="images/delete.jpg" /></a>
        </div>
        <div style="clear:both" ></div>
    </div>
    <div id="NoticeContent" align = "center" style="background:#FFF;color:red;font-weight:bold;padding:5px; margin:0px 5px;"></div>
    <div id="NoticeBottom" align = "center" style="height:18px;background:url(images/notice_bottom.png) repeat-x;"></div>
 </div>
 <div id="module_status_div" class="module_status_notice">
     <img src="<%=basePath %>images/module_status.png" /><br/>
     <%=module_status_text %>
 </div>
</body>
</html>
